IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_SrvrInstncEAV_Parameter]') AND parent_object_id = OBJECT_ID(N'[dbo].[SrvrInstncEAV]'))
BEGIN
     ALTER TABLE [dbo].[SrvrInstncEAV] DROP CONSTRAINT [FK_SrvrInstncEAV_Parameter]
END
GO

ALTER TABLE [dbo].[SrvrInstncEAV] WITH CHECK ADD CONSTRAINT [FK_SrvrInstncEAV_Parameter] 
     FOREIGN KEY([ParameterId]) REFERENCES [dbo].[Parameter] ([ParameterId])
GO
